package com.crrcdt.service;

import com.crrcdt.api.TicketService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.stereotype.Service;

/**
 * @author 神瑛侍者 on 2020/8/27.
 * @version 1.0
 */
@Service
public class UserService {
    //需要去注册中心拿服务
    @Reference
    TicketService ticketService;
    public String buyTicket(){
        String res="我是consumer消费者02，"+ticketService.getTicket();
        System.out.println(res);
        return res;
    }
}
